{include file="header_cart.html"}
<script type="text/javascript" src="{lib file=order.js}" charset="utf-8"></script>
<SCRIPT language=javascript src="{lib file=imagePreview.js}"></SCRIPT>
<form method="post" id="order_form">
<div class="content_color" style="border-top:1px #DDDCDC solid">
<div class="content">

<!--{if !$visitor.user_id}#会员没有登录-->
<table width="100%" style="margin-top:8px">
<tr>
  <td valign="top"><img src="{res file=images/common/order_noreg1.png}" width="495" height="61"/></td>
  <td valign="top" style="text-align:right"><a href="index.php?app=member&amp;act=login"><img src="{res file=images/common/order_noreg2.png}" width="495" height="50"/></a></td>
</tr>
</table>
<!--{/if}-->  

<!--收货人信息-->
<div class="order_main {if !$my_address}order_tig_kuan{/if}">
{include file="order.shipping.html"}
</div>

<!--支付方式-->
<div class="order_main">
<h4 class="h4_title">支付方式</h4>
 <ul class="order_payment">
  <!--{if $store_huodaofukuan}-->
  <li><label for="payment1"><input id="payment1" name="payment_code" type="radio" value="cod" {if $store_huodaofukuan}checked="checked"{/if}/> <b>货到付款</b>购物零风险，收到货后验收满意后付款给快递员</label></li>
  <!--{/if}-->  
  <li><label for="payment2"><input id="payment2" type="radio" name="payment_code" value="" {if !$store_huodaofukuan}checked="checked"{/if}/> <b>在线支付</b>在线支付支持支付宝、财付通、及绝大多数银行借记卡和部分银行信用卡</label><a href="javascript:;" id="show_banklist">查看银行列表<span class="show_banklist"><img src="" bank_src="{res file=images/common/car_order_bank_list.gif}" width="557" height="324"/></span></a>
  </li>
 </ul>
</div>

<SCRIPT type=text/javascript>
//初始化物流配送数据
var tmplogistics = '';
var tmpgoods_amount = '';
var tmpgoods_quantity = '';
<!--{if $unify_shipping.tmplogistics}-->
tmplogistics = '"{$unify_shipping.store_id}":{{$unify_shipping.tmplogistics}}';
<!--{/if}-->
<!--{foreach from=$carts key=store_id item=cart}-->
tmplogistics += tmplogistics==''?'"{$store_id}":{{$cart.tmplogistics}}':',"{$store_id}":{{$cart.tmplogistics}}';
tmpgoods_amount += tmpgoods_amount==''?'"{$store_id}":{$cart.amount}':',"{$store_id}":{$cart.amount}';
<!--{/foreach}-->
tmplogistics = '{'+tmplogistics+'}';
tmpgoods_amount = '{'+tmpgoods_amount+'}';
eval('var logistics = ' + tmplogistics);
eval('var goods_amount = ' + tmpgoods_amount);

//根据配送地址计算运费
function calc_shipping_address_options(){
$('input[name="address_options"]').click(function(){	  
  if( 0 != $( 'input:checked[name="address_options"]' ).val() ){	
	  var region_id = $( '#on_pro_' + this.value ).val();
	  if( $('select[name="unify_ship"] option:selected').val() > 0 ){//省邮区的运费更新操作
		  select_region(region_id,1);//使用为1的店铺模板作为默认模板
	  }		
	  $('input[name="store_check"]:checked').each(function(){
		  var store_temp_id = $(this).val();//店铺ID
		  if($('#is_unify_'+store_temp_id).val() == 0){//非省邮区的店铺再更新运费
			  select_region(region_id,store_temp_id);
		  }
	  });
  }
});	
}
</SCRIPT>

<!--收货人信息-->
<div class="order_main">
<h4 class="h4_title">商品信息<a href="index.php?app=cart">返回修改购物车>></a></h4>

<!--{foreach from=$carts item=cart key=store_id}-->
<div class="buytable">
 <table class="buy_goods_table">
  <tr>
    <th style="text-align:left;padding-left:8px"><input name="store_check" type="checkbox" value="{$store_id}" checked="checked" style="display:none"/><a href="{url app=store&id=$store_id}" target="_blank">{$cart.store_name|escape}</a>
  <!--{if $cart.un_freight eq 1}--><span style="padding-left:15px;color:#FF4444"><img src="{res file=images/lcj_certification2.gif}" width="14" height="16" align="absmiddle" /> 已加入省邮服务</span><!--{/if}--></th>
    <th width="90">价格（元）</th>
    <th width="80">数量</th>
    <th width="80">优惠（元）</th>
    <th width="100">小计（元）</th>
  </tr>
  <!--{foreach from=$cart.goods item=goods key=key}-->
  <tr id="cart_item_{$goods.rec_id}" style="border-bottom:1px #E8E8E8 dotted">
    <td class="padding1">
    <p class="ware_pic"><a href="{url app=goods&id=$goods.goods_id}" class="preview" rel="{$goods.goods_image}" target="_blank"><img src="{$goods.goods_image}" alt="{$goods.goods_name|escape}" width="45" height="60" /></a></p>
    <h3><!--{if $goods.freeship eq 1}--><img src="{res file=images/freeship.gif}" width="16" height="16" alt="该商品提供免运费服务" align="absbottom"/> <!--{/if}--><a href="{url app=goods&id=$goods.goods_id}" target="_blank">{$goods.goods_name|escape}</a></h3>
    <ul class="attr_color_size">{$goods.specification|escape}</ul>
    </td>
    <td width="90"><span class="price">{$goods.price|price}</span></td>
    <td width="80">{$goods.quantity}</td>
    <td width="80"><!--{if $goods.subtotal_dc>0}--><font class="price2">{$goods.subtotal_dc|price}</font><!--{else}-->-<!--{/if}--></td>
    <td width="100"><!--{if $goods.subtotal_yl>0}--><p style="font-size:13px;padding-bottom:5px;color:#666;text-decoration:line-through">{$goods.subtotal_yl|price}</p><!--{/if}-->
    <span class="price">{$goods.subtotal|price}</span></td>
  </tr>
  <!--{/foreach}-->     
  </table>
  <table width="100%">
  <tr>
    <td class="row1_style">
    <DIV class="buy_foot">
     <div class="buy_foot_left"><label>备注：</label><input id="postscript" name="postscript_{$store_id}" valuecache="" type="text" tips="{$lang.message_seller_tig}" style="width:390px; font-size:12px;padding:3px;color:#C5C5C5;border:1px #E2E2E2 solid;vertical-align:middle"/></div>
     <INPUT class=express_type_{$store_id} type=checkbox value=1 name=express_type style="display:none">
     <div class="buy_foot_right">
      <!--{if $cart.kind_goods eq $cart.kind_freeship}-->该专场所有商品包邮免运费<INPUT id="is_freeship_{$store_id}" type=hidden value="1" name="is_freeship_{$store_id}">
      <!--{else}-->
        <!--{if $cart.un_freight eq 1}-->该专场集中设置物流
        <!--{else}-->
          配送方式：<select class="express_{$store_id}" name="express_{$store_id}" id="{$store_id}">
          <option selected="selected" value="0">{$lang.choose_mode}</option>
          <!--{foreach from=$cart.express item=express_for}-->
          <option value="{$express_for}"><!--{if $express_for eq 1}-->货运<!--{elseif $express_for eq 2}-->快递<!--{elseif $express_for eq 3}-->EMS<!--{/if}--></option>
          <!--{/foreach}-->
          </select>
        <!--{/if}-->      
      <!--{/if}-->
     </div></DIV>
    </td>
    </tr>
  <tr>
    <td class="row2_style">
<INPUT id=is_unify_{$store_id} type=hidden value={$cart.un_freight} name=is_unify_{$store_id}>
<input id=weight_{$store_id} type=hidden value={$cart.weight} name=weight_{$store_id}>
<INPUT id=freight_{$store_id} type=hidden value=0 name=freight_{$store_id}>
<INPUT id=firstfee_{$store_id} type=hidden value=0 name=firstfee_{$store_id}>
<INPUT id=baseweight_{$store_id} type=hidden value=0 name=baseweight_{$store_id}>
<INPUT id=renewalfee_{$store_id} type=hidden value=0 name=renewalfee_{$store_id}>
<INPUT id=overweight_{$store_id} type=hidden value=0 name=overweight_{$store_id}>
<INPUT id=order_money_{$store_id} type=hidden value={$cart.amount} name=order_money_{$store_id}>
<INPUT id=shipping_id_{$store_id} type=hidden value={$cart.shipping_id} name=shipping_id_{$store_id}>
<INPUT id=store_name_{$store_id} type=hidden value="{$cart.store_name}" name=store_name_{$store_id} >
商品总额 <strong>{$cart.amount|price}</strong> {$cart.yuan} + {$lang.freight} <strong id="total_freight_{$store_id}">0</strong> {$lang.yuan} = 本单金额 <strong id="cart_amount_{$store_id}">{$cart.amount|price}</strong> {$lang.yuan}
    </td>
    </tr>  
  </table>
   <SCRIPT language=javascript type=text/javascript> $(function(){  calc_shipping({$store_id});  }); </SCRIPT>
  </div>
  <!--{/foreach}-->
  
  <!--{if $unify_shipping.total_num}#看看是否已经有省邮区的-->
  <div class="confir_seller">
   <INPUT id="is_unify_{$unify_shipping.store_id}" type=hidden  value="{$unify_shipping.store_id}" name="is_unify_{$unify_shipping.store_id}">
   <INPUT id="unify_weight" type=hidden value="{$unify_shipping.total_weight}" name="unify_weight">
   <INPUT id="unify_number" type=hidden value="{$unify_shipping.total_num}" name="unify_number">
   <img src="{res file=images/lcj_certification2.gif}" width="14" height="16" align="absmiddle" />
   <strong>省邮区集中发货，已加入省邮区的商铺运费统一计算。</strong>
    配送方式：<select class="express_{$unify_shipping.store_id}" name="unify_ship">
    <option selected="selected" value="0">请选择省邮区配送方式</option>
    <!--{foreach from=$unify_shipping.express item=express_for}-->
    <option value="{$express_for}"><!--{if $express_for eq 1}-->货运<!--{elseif $express_for eq 2}-->快递<!--{elseif $express_for eq 3}-->EMS<!--{/if}--></option>
    <!--{/foreach}-->
    </select>
    {$lang.total_freight}{$lang.colon}<I id="unify_ship_freight">0</I> {$lang.yuan}，已平均分配到加入省邮服务的商铺。   
    <SCRIPT language=javascript type=text/javascript> $(function(){  calc_shipping({$unify_shipping.store_id});  }); </SCRIPT>
  </div>
  <!--{/if}-->
  
  <div class="buy_bottom"> 
     <div class="buy_left">
       <a href="index.php?app=cart" class="buy_confirm"><<返回修改购物车</a>
       <!--{if $discount_total>0}--><span class="buy_savemoney">此次购物共省了：<b>{$discount_total|price}</b> {$lang.yuan}</span><!--{/if}-->     
     </div>
     <div class="buy_right"><input name="select_store_ids" type="hidden" value="{$select_store_ids}">
       <div class="buy_total">应付订单总金额：<strong id="total_amount"></strong></div>
       <A id="buy_next" href="javascript:void(0)"><span style="display:none"></span>提交订单</A>
     </div>     
  </div>
  
</div> 
<br />

 <div class="clear"></div>
</div></div>
</form>
<SCRIPT type=text/javascript>
$(function(){
   calc_shipping_address_options();
});
</SCRIPT>
{include file="footer.html"}